package com.hrm.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.hrm.dao.PeopleMapper;
import com.hrm.entity.People;
import com.hrm.service.PeopleService;

public class PeopleServiceImpl implements PeopleService {
	private static final Log log = LogFactory.getLog(PeopleServiceImpl.class); 
	@Autowired
	private PeopleMapper peopleMapper;
	@Override
	public People login(int pid) {
		Map<String,Object> map = new HashMap<String, Object>();
		map.put("pid", pid);
		List<People> peoples=peopleMapper.selectPeopleByMap(map);
		return (peoples==null||peoples.size()==0)?null:peopleMapper.selectPeopleByMap(map).get(0);
	}



}
